This Item Conflicts with Another Item of the Same Name Error

Occurs when you are calling an overloaded method and REALbasic cannot determine which version you meant to call. This happens when two methods have the same name, number of parameters, and the data types of the parameters match. This error will also occur if a method name conflicts with another type of project item such as a window, menuitem, control, and so forth.

For example, if you have a global function named Foo and a window called Foo.


Example

The method myOverLoadedMethod takes three integer parameters, but it is defined twice (performing different functions) in a window's Code Editor. A call to myOverLoadedMethod produces the error. The solution is to rename or eliminate the second instance of myOverLoadedMethod.

Instance 1

Sub myOverLoadedMethod(a as Integer, b as Integer, c as Integer)
Dim d as Integer
 d=a*b/c
MsgBox str(d)

Instance2

Sub myOverLoadedMethod(x as Integer, y as Integer, zas Integer)
  Dim d as Integer
 d=x/z*y
MsgBox str(d)

Calling method

Dim a,b,c as Integer
a=5
b=10
c=15
myOverloadedMethod(a,b,c)